Public Class modificarCurso
    Private objG As capaNegocios.Gestor = objG.instanciar()
    Private idCurso As Integer

    Public Sub cargarDatos(ByVal pcod As String, ByVal pnom As String, ByVal pidC As Integer)
        Me.codigo.Text = pcod
        Me.nombre.Text = pnom
        Me.idCurso = pidC
        'MessageBox.Show(Me.idCurso, "", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End Sub

    Private Sub Modificar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Modificar.Click
        Dim cod, nom As String
        cod = Me.codigo.Text
        nom = Me.nombre.Text
        Try
            objG.actualizarCurso(Me.idCurso, cod, nom)
            Me.DialogResult = Windows.Forms.DialogResult.OK
            MessageBox.Show("Fue actualizado satisfactoriamente", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Catch ex As Exception
            MessageBox.Show(ex.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Me.DialogResult = Windows.Forms.DialogResult.None
        End Try
    End Sub

    Private Sub Cancelar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Close()
    End Sub
End Class